
<?php

if(!empty($_POST)){

    if($_POST['password']!=$_POST['cpassword']){
        echo "<script>alert('密码不一致');history.go(-1);</script>";die;
    }

    // 密码加密
    $_POST['password'] = md5($_POST['password']);

    unset($_POST['cpassword']);

    $row = add('menber',$_POST);

    if($row>0){
        // 引入邮件发送文件
        include_once(LIB_PATH.'send_email.php');
        // 调用邮件发送函数
        send_email($_POST['email']);

     echo"<script>alert('帐号注册成功，请到注册的邮箱中激活！');location.href='index.php?c=index&a=index';</script>";die;
    }else{
     echo"<script>alert('注册失败');history.go(-1)</script>";die;
    }

}










//加载前台公共视图
 include (View_PATH.$admin.'/communal.html');


?>

